<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String contexts = request.getContextPath();
    pageContext.setAttribute("ctx", contexts);
%>
<html>

<link type="text/css" rel="stylesheet" href="${ctx}/css/login/userData/editUserData.css">
<link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script type="text/javascript" src="${ctx}/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="${ctx}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/js/login/userData/editUserData.js"></script>
<body>
<div id="returnList">
    <s:form class="form-horizontal" id="updateUserData" action="updateUserData" role="form" namespace="/" method="POST"
            enctype="multipart/form-data">
    <div class="form-group">
        <label for="inputUserName" class="col-sm-2 control-label">姓名 :</label>

        <div class="col-sm-10">
            <input type="text" class="form-control" id="inputUserName" name="userDataVO.userName"
                   value="${userDataVO.userName}">
        </div>
    </div>


    <div class="form-group" id="div_userImg">
        <label for="inputUserImg" class="col-sm-2 control-label">头像 :</label>

        <div class="col-sm-10 img">
            <input type="hidden" id="inputUserImg" name="userDataVO.userImage" value="${userDataVO.userImage}">
            <input type="file" name="imgFile">
            <input type="hidden" name="imgFileType">
            <c:if test="${userDataVO.userImage ne  null}">
                <img class="img-circle" src=${ctx}${userDataVO.userImage}>
            </c:if>
        </div>
    </div>

    <div class="form-group" id="div_nationality">
        <label for="inputNationality" class="col-sm-2 control-label">国籍 :</label>

        <div class="col-sm-10">
            <input type="text" class="form-control" id="inputNationality" name="userDataVO.nationality"
                   value="${userDataVO.nationality}">
        </div>
    </div>

    <div class="form-group" id="div_province">
        <label for="inputProvince" class="col-sm-2 control-label">省份 :</label>

        <div class="col-sm-10">
            <input type="text" class="form-control" id="inputProvince" name="userDataVO.province"
                   value="${userDataVO.province}">
        </div>
    </div>

    <div class="form-group" id="div_submit">
        <div class="col-sm-offset-2 col-sm-10">
            <button id="div_submit_val" type="button" class="btn btn-info" onclick="editUserDataSubmit()">确定
            </button>
            <button type="button" class="btn btn-info" onclick="location.href='${ctx }/loadUserData.action'">返回</a>
            </button>
        </div>

        </s:form>
    </div>
</div>
</body>
</html>